<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title>网运宝管理系统</title>
    <meta name="author" content="DeathGhost"/>
    <link rel="stylesheet" type="text/css" href="css/style.css" th:href="@{/css/style.css}"/>
    <style>
        body {
            height: 100%;
            background: #16a085;
            overflow: hidden;
        }

        canvas {
            z-index: -1;
            position: absolute;
        }

        .black_overlay {
            display: none;
            position: absolute;
            top: 0%;
            left: 0%;
            width: 100%;
            height: 100%;
            background-color: black;
            z-index: 1001;
            -moz-opacity: 0.8;
            opacity: .80;
            filter: alpha(opacity=80);
        }

        .white_content {
            display: none;
            position: absolute;
            top: 25%;
            left: 35%;
            width: 25%;
            height: 15%;
            padding: 16px;
            border: 2px solid black;
            background-color: white;
            z-index: 1002;
            overflow: auto;
        }
    </style>
    <script src="js/jquery.js" th:src="@{/webjars/jquery/3.4.1/jquery.js}"></script>
    <script src="js/verifyCode.js" th:src="@{/js/verifyCode.js}"></script>
    <script src="js/Particleground.js" th:src="@{/js/Particleground.js}"></script>
    <script>
        <!--当里面iframe跟不上的时候-->
        if (window != top) {
            top.location.href = location.href;
        }
        $(function () {
            //粒子背景特效
            $('body').particleground({
                dotColor: '#5cbdaa',
                lineColor: '#5cbdaa'
            });
        })

        $(document).ready(function () {

            $("#loginBtn").click(function () {
                $.post("/sys/user/login", {
                    username: $("#userName").val(),
                    password: $("#password").val(),
                    "imageCode": $("#imageCode").val()
                }, function (result) {
                    if (result.success) {
                        window.location.href = "/main";
                    } else {
                        $("#message").html(result.info);
                        changeImg();
                    }
                });
            });
        });

    </script>
</head>
<body>
<dl class="admin_login">
    <dt>
        <strong>网运宝管理系统</strong>
        <em>netbao Management System</em>
    </dt>
    <dd class="user_icon">
        <input type="text" id="userName" placeholder="账号" class="login_txtbx" th:value="wyb"/>
    </dd>
    <dd class="pwd_icon">
        <input type="password" id="password" placeholder="密码" class="login_txtbx"/>
    </dd>
    <dd class="val_icon">
        <div class="checkcode">
            <input type="text" id="imageCode" name="imageCode" placeholder="验证码" maxlength="4" class="login_txtbx">
            <img id="imgObj" title="看不清，换一张" src="/drawImage" onclick="changeImg()"/>
        </div>
    </dd>
    <dd>
        <input type="button" id="loginBtn" value="立即登陆" class="submit_btn"/>
    </dd>
    <dd>
        <span id="message" style="color: red" />
    </dd>
    <dd>
        <p><a href="https://bdqn.cn/" target="_blank">© 2019-2020 开牛软件 版权所有</a></p>
    </dd>
</dl>
</div>
</body>
</html>
